<?php if (!defined('THINK_PATH')) exit(); /*a:3:{s:79:"C:\xampp\htdocs\thinkphp5_home\public/../application/admin\view\user\index.html";i:1474501084;s:79:"C:\xampp\htdocs\thinkphp5_home\public/../application/admin\view\public\top.html";i:1473468694;s:80:"C:\xampp\htdocs\thinkphp5_home\public/../application/admin\view\public\left.html";i:1476452259;}*/ ?>
<!doctype html>
<html>
<head>
    <meta charset="UTF-8">
    <title>后台管理</title>
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/static/admin/css/common.css"/>
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/static/admin/css/main.css"/>
    <script type="text/javascript" src="__PUBLIC__/static/admin/js/libs/modernizr.min.js"></script>
    <script type="text/javascript" src="__PUBLIC__/static/admin/js/checkAll.js"></script>
  	<style>
		/*下面可以自己修改*/
    .result-tab th,
    .result-tab td{
      text-align:center;
    }
    </style>
</head>
<body>
<!--页面顶部导航模块-->
<div class="topbar-wrap white">
    <div class="topbar-inner clearfix">
        <div class="topbar-logo-wrap clearfix">
            <h1 class="topbar-logo none"><a href="index.html" class="navbar-brand">后台管理</a></h1>
            <ul class="navbar-list clearfix">
                <li><a href="<?php echo url('../index/Index/index'); ?>">首页</a></li>
                <li><a href="<?php echo url('Index/index'); ?>" target="_blank" class="on" >后台</a></li>
            </ul>
        </div>
        <div class="top-info-wrap">
            <ul class="top-info-list clearfix">
            
                <li><a href="#">
                <?php 
                switch (session('user_type'))
                {
                case 0:
                  $username = '普通用户';
                  break;
                case 1:
                  $username = '系统管理员';
                  break;
                default:
                  $username = '未知身份';
                }
                  echo (session('user_name')." | ".$username);?>
                </a></li>
                <li><a href="<?php echo url('User/edit',array('id'=>session('user_id'))); ?>">修改密码</a></li>
                <li><a href="<?php echo url('Login/logout'); ?>">退出</a></li>
            </ul>
        </div>
    </div>
</div>

<div class="container clearfix">
	<!--页面左侧导航模块-->
	<div class="sidebar-wrap">
	<div class="sidebar-title">
		<h1>菜单</h1>
	</div>
	<div class="sidebar-content">
		<ul class="sidebar-list">
			<li>
				<a href="#"><i class="icon-font">&#xe003;</i>常用操作</a>
				<ul class="sub-menu">
					<li><a href="<?php echo url('Category/index'); ?>"><i class="icon-font">&#xe008;</i>栏目管理</a></li>
					<li><a href="<?php echo url('Article/index'); ?>"><i class="icon-font">&#xe005;</i>文章管理</a></li>
					<li><a href="<?php echo url('Page/index'); ?>"><i class="icon-font">&#xe012;</i>页面管理</a></li>
					<li><a href="<?php echo url('Link/index'); ?>"><i class="icon-font">&#xe052;</i>友情链接</a></li>
					<li><a href="design.html"><i class="icon-font">&#xe004;</i>留言管理</a></li>
					<li><a href="design.html"><i class="icon-font">&#xe033;</i>广告管理</a></li>
					<li><a href="<?php echo url('User/index'); ?>"><i class="icon-font">&#xe006;</i>用户管理</a></li>
				</ul>
			</li>
			<li>
				<a href="#"><i class="icon-font">&#xe018;</i>系统管理</a>
				<ul class="sub-menu">
					<li><a href="<?php echo url('Config/clist'); ?>"><i class="icon-font">&#xe017;</i>系统配置</a></li>
					<li><a href="<?php echo url('Config/index'); ?>"><i class="icon-font">&#xe017;</i>配置管理</a></li>
					<li><a href="system.html"><i class="icon-font">&#xe037;</i>清理缓存</a></li>
					<li><a href="system.html"><i class="icon-font">&#xe046;</i>数据备份</a></li>
					<li><a href="system.html"><i class="icon-font">&#xe045;</i>数据还原</a></li>
				</ul>
			</li>
		</ul>
	</div>
</div>

    <!--/sidebar-->
    <div class="main-wrap">

        <div class="crumb-wrap">
            <div class="crumb-list"><i class="icon-font"></i><a href="<?php echo url('Index/index'); ?>">后台</a><span class="crumb-step">&gt;</span><span class="crumb-name">用户管理</span></div>
        </div>
    <!--<div class="search-wrap">
            <div class="search-content">
                <form action="/js__PUBLIC__/static/admin/css/admin/design/index" method="post">
                    <table class="search-tab">
                        <tr>
                            <th>选择分类:</th>
                            <td>
                                <select name="search-sort" id="">
                                    <option value="">全部</option>
                                    <option value="19">精品界面</option><option value="20">推荐界面</option>
                                </select>
                            </td>
                            <th width="70">关键字:</th>
                            <td><input class="common-text" placeholder="关键字" name="keywords" value="" id="" type="text"></td>
                            <td><input class="btn btn-primary btn2" name="sub" value="查询" type="submit"></td>
                        </tr>
                    </table>
                </form>
            </div>
        </div>-->
        <div class="result-wrap">
            <form name="myform" id="myform" method="post" action="batch_delete">
                <div class="result-title">
                    <div class="result-list">
                        <a href="<?php echo url('user/insert'); ?>"><i class="icon-font"></i>新增用户</a>
                        <a id="batchDel" href="javascript:void(0)" onclick="document:myform.submit();"><i class="icon-font"></i>批量删除</a>
                        <!--<a id="updateOrd" href="javascript:void(0)"><i class="icon-font"></i>更新排序</a>-->
                    </div>
                </div>
                <div class="result-content">
                    

                      <table class="result-tab" id="user_list" width="100%">
                          <tr>
                              <th class="tc" width="5%"><input class="allChoose" name="" type="checkbox" onclick="checkAll(this, 'user_list', 'user_item');"></th>
                              <!--<th>排序</th>-->
                              <th width="3%">ID</th>
                              <th width="8%">用户名</th>
                              <th width="8%">类型</th>
                              <th width="8%">姓名</th>
                              <th width="8%">激活</th>
                              <th width="12%">创建时间</th>
                              <th width="12%">更新时间</th>
                              <th width="10%">操作</th>
                          </tr>
                          <?php if(is_array($users) || $users instanceof \think\Collection): $i = 0; $__LIST__ = $users;if( count($__LIST__)==0 ) : echo "暂时没有数据" ;else: foreach($__LIST__ as $key=>$data): $mod = ($i % 2 );++$i;?>
                          <tr>
                              <td class="tc"><input class="user_item" name="id[]" value="59" type="checkbox"></td>
                              <!--<td>
                                  <input name="ids[]" value="59" type="hidden">
                                  <input class="common-input sort-input" name="ord[]" value="0" type="text">
                              </td>-->
                              <td><?php echo $data['user_id']; ?></td>
                              <td title=<?php echo $data['user_name']; ?>><?php echo $data['user_name']; ?></td>
                              <td title=<?php echo $data['user_type']; ?>>
                                <?php switch($data['user_type']): case "0": ?>普通用户<?php break; case "1": ?>管理员<?php break; default: ?>default
                                <?php endswitch; ?>
                              </td>
                              <td title=<?php echo $data['current_user']; ?>><?php echo $data['current_user']; ?></td>
                              <td title=<?php echo $data['active_status']; ?>>
                                <?php switch($data['active_status']): case "0": ?><font color="red">×</font><?php break; case "1": ?><font color="green">√</font><?php break; default: ?>default
                                <?php endswitch; ?>
                              </td>
                              <td title=<?php echo $data['create_time']; ?>><?php echo $data['create_time']; ?></td>
                              <td title=<?php echo $data['update_time']; ?>><?php echo $data['update_time']; ?></td>
                              <td>
                                  <a class="link-update" href="<?php echo url('edit',array('id'=>$data['user_id'])); ?>">修改</a>
                                  <?php if('1' != $data['user_type']): ?>
                                    <a class="link-del" href="<?php echo url('delete',array('id'=>$data['user_id'])); ?>" onclick ="return confirm('确定删除该用户?')" >删除</a>
                                  <?php endif; ?>
                              </td>
                          </tr>
                          <?php endforeach; endif; else: echo "暂时没有数据" ;endif; ?>
                      </table>
                <!--<div class="list-page"> 2 条 1/1 页</div>-->
                </div>
            </form>
        </div>
    </div>
    <!--/main-->
</div>
</body>
</html>